<template>
    <div class="shopInfo">
        <van-card
        v-for="item in arr" :key="item.id"
            :num="item.num"
            :price="item.price"
            :title="item.goodsname"
            :thumb="$pre+item.img"
        />
    </div>
</template>

<script>
import {reqGetShop} from "../../../http/api"
export default {
    data () {
        return {
            arr:[]
        }
    },
    mounted () {
        let idstr = JSON.parse(sessionStorage.getItem("orderInfo")).idstr
        let idArr = idstr.split(",")
        idArr.forEach(item => {
            reqGetShop({
                uid:JSON.parse(localStorage.getItem("isLogin")).uid,
                id:item
            }).then(res=>{
                if(res.data.code==200){
                    this.arr.push(res.data.list[0])
                }
            })
        });
    },

}
</script>

<style scoped lang="less">
@import url(../../../less/index.less);
.van-card__content{
    justify-content: space-around !important;
}
</style>